package com.lantosec.hmrp.modules.warning.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.warning.entity.WarningEvalNote;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 处置奖惩记录 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="WarningEvalNote对象", description="处置奖惩记录")
public class WarningEvalNoteVO extends BaseVO<WarningEvalNote> {
    private static final long serialVersionUID = 1L;


    public WarningEvalNoteVO(WarningEvalNote entity){
        this.noteId = entity.getNoteId();
        this.dataId = entity.getDataId();
        this.ruleId = entity.getRuleId();
        this.dataTime = entity.getDataTime();
        this.evalItemId = entity.getEvalItemId();
        this.rewardOrientation = entity.getRewardOrientation();
        this.rewardType = entity.getRewardType();
        this.rewardValue = entity.getRewardValue();
        this.targetMode = entity.getTargetMode();
        this.targetId = entity.getTargetId();
        this.targetName = entity.getTargetName();
        this.handleRemark = entity.getHandleRemark();
        this.violateFlag = entity.getViolateFlag();
        this.handleUserId = entity.getHandleUserId();
        this.handleUser = entity.getHandleUser();
        this.rewardArr = entity.getRewardArr();
        this.warningFlag = entity.getWarningFlag();
    }

    @Override
    public WarningEvalNote convertToEntity(){
        return new WarningEvalNote(this);
    }


    @ApiModelProperty(value = "处置奖惩记录ID")
    private Integer noteId;

    @ApiModelProperty(value = "预警数据ID")
    private Integer dataId;

    @ApiModelProperty(value = "预警规则ID")
    private String ruleId;

    @ApiModelProperty(value = "预警数据时间")
    private String dataTime;

    @ApiModelProperty(value = "处置标准(考评项目ID)")
    private String evalItemId;

    @ApiModelProperty(value = "项目类型(1分 2钱)")
    private Integer rewardOrientation;

    @ApiModelProperty(value = "奖惩形式(1奖 2惩)")
    private Integer rewardType;

    @ApiModelProperty(value = "奖惩值(正为加 负为扣)")
    private BigDecimal rewardValue;

    @ApiModelProperty(value = "责任队形类型(1部门 2个人)")
    private Integer targetMode;

    @ApiModelProperty(value = "责任对象ID")
    private String targetId;

    @ApiModelProperty(value = "责任对象")
    private String targetName;

    @ApiModelProperty(value = "处置说明")
    @TableField(exist = false)
    private String handleRemark;

    @ApiModelProperty(value = "是否违规")
    @TableField(exist = false)
    private Integer violateFlag;

    @ApiModelProperty(value = "处置人ID")
    @TableField(exist = false)
    private String handleUserId;

    @ApiModelProperty(value = "处置人")
    @TableField(exist = false)
    private String handleUser;

    @ApiModelProperty(value = "考评项")
    @TableField(exist = false)
    private List rewardArr;

    @ApiModelProperty(value = "区分pc跟app  null为pc，1为app")
    @TableField(exist = false)
    private Integer warningFlag;
}
